
package makai;

import java.awt.Color;
import java.io.Serializable;
import makai.ui.ColorChooser;

/**
 * TODO: Description Here
 * 
 * @author Krechevskoy
 * @version 0.0
 */
public class Engine implements Serializable {
    
    // Singleton Instance
    private static Engine instance = new Engine();
    
    /**
     * @return The singleton instance of the Makai Engine
     */
    public static Engine getInstance(){
        return instance;
    }
    
    /**
     * Constructs a new Engine
     * 
     * This should only be called once!
     */
    private Engine(){
        // TODO: Construct the Engine
    }
    
    /******************
     * Color Controls *
     ******************/
    
    /**
     * @return The active foreground color
     */
    public static Color getForegroundColor(){
        return ColorChooser.getInstance().getForegroundColor();
    }
    
    /**
     * Sets the currently active foreground color
     */
    public static void setForegroundColor(Color color){
        ColorChooser.getInstance().setForegroundColor(color);
    }
    
    /**
     * @return The active background color
     */
    public static Color getBackgroundColor(){
        return ColorChooser.getInstance().getBackgroundColor();
    }
    
    /**
     * Sets the currently active foreground color
     */
    public static void setBackgroundColor(Color color){
        ColorChooser.getInstance().setBackgroundColor(color);
    }
    
    /**
     * Swap the current foreground and background colors
     */
    public static void swapColors(){
        ColorChooser.getInstance().swapColors();
    }
    
}
